import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:miaowu/app/module/mine/mine_router.dart';

import '../global_web/global_web_page.dart';
import '../module/splash/splash_page.dart';

class AppRouter {
  //如果页面只需要垂直方向，放入此白名单即可自动处理
  static const onlyVerticalOrientationRouterName = [
    CommonRouter.splash, //闪屏页面，保持垂直布局
  ];

  static final routes = [
    ...CommonRouter.routes,
    ...MineRouter.routes,
    // ...AuthRouter.routes,
    // ...MineRouter.routes,
    // ...ShopRouter.routes,
    // // ...LibraryRouter.routes,
    // ...AiRouter.routes,
  ];
}

class CommonRouter {
  // 默认的路由
  static const splash = '/splash';

  static const guide = '/guide'; //指引页面

  static const imageBrowser = '/preview/image'; //预览图片
  static const web = '/jumpH5'; //全局公用的Web页面
  static const initial = CommonRouter.splash;

  static const citySelect = '/CitySelectListPage';

  // 引导页
  static const introSlider = '/IntroSlider';

  static final routes = [
    GetPage(name: CommonRouter.splash, page: () => SplashPage()),

    //全局公用的WebView
    GetPage(name: CommonRouter.web, page: () => GlobalWebPage(key: UniqueKey())),

    // GetPage(name: CommonRouter.citySelect, page: () => CityChoosePage(), transition: Transition.fadeIn),
    // GetPage(name: CommonRouter.introSlider, page: () => IntroSliderPage(), transition: Transition.fadeIn),
  ];
}
